package com.dotflat.satistics.controller;

import com.dotflat.satistics.dto.FinOverviewDTO;
import com.dotflat.satistics.dto.FinSatisticDTO;
import com.dotflat.satistics.repository.crm.ClienteleRepository;
import com.dotflat.satistics.repository.crm.ContractProductRepository;
import com.dotflat.satistics.repository.crm.IncomeRepository;
import com.dotflat.satistics.service.FinSatisticsService;
import com.matt.commons.dto.sso.StaffDTO;
import com.matt.commons.model.StatusResponse;
import com.matt.commons.page.PagerQuery;
import com.matt.foundation.dto.teach.ChildDTO;
import com.matt.foundation.utils.DateUtil;
import com.matt.remoteCall.SsoCallService;
import com.matt.service.ClienteleService;
import com.matt.service.TeachCallService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.*;
import java.util.stream.Collectors;

import static com.matt.foundation.constant.CommonConstant.TICKET;

@Slf4j
@RestController
@RequestMapping("/clientele/satistics")
@Api(tags = "客户 - 统计")
public class ClienteleSatisticsController {

    @Autowired
    private ClienteleService clienteleService;

    @Autowired
    private SsoCallService ssoCallService;

    @Autowired
    private ClienteleRepository clienteleRepository;

    @RequestMapping(value = "/overview",method = RequestMethod.POST)
    @ApiOperation(value = "年度概况", response = FinOverviewDTO.class)
    public  StatusResponse overviewYear(@RequestHeader(TICKET) String ticket){

//        全部客户(36)
//        已签合同(52)
//        意向客户(2)
//        流失客户(0)
        return StatusResponse.success();
    }

}
